<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
  </head>
  <body style="padding: 50px; text-align: center;">
    <button id="openList">打开IM列表</button>
    <button id="openChat">打开IM会话</button>
  </body>
  <script type="text/javascript">
    apiready = function(){
      api.removeLaunchView();
      var token = 'eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ4NjdGNzEwMEM1OENDRDFBNUUzMzVFNEEzN0RGNTUwIiwidHlwIjoiSldUIn0.eyJuYmYiOjE2Njg0Nzc4NDAsImV4cCI6MTY2OTE5Nzg0MCwiaXNzIjoiaHR0cDovL3d3dy5oeXN5eWwuY29tIiwiYXVkIjpbIkZvck91dFN5c3RlbUFwaSIsImh5cy5pbS5hcGkiLCJIWVMuU0MuQWRtaW5BcGkiLCJIWVMuU0MuQXBpIiwiSHlzTWFsbC5DbGllbnQuQVBJIiwiSHlzTWFsbC5TeXNNYW5hZ2VtZW50LkFQSSIsInBlcm1pc3Npb24uYXBpIiwieXNhbGVyLmNsaWVudC5hcGkiLCJ6YmIuYWRtaW4uYXBpIiwiemJiLmNsaWVudC5hcGkiLCJaSlMuSU0uQ2xpZW50LkFwcEFwaSIsInpqcy5vc3MuYXBpIl0sImNsaWVudF9pZCI6IlpCQi5TeXN0ZW0iLCJzdWIiOiJjYjUzM2I4OS02NTU1LTRjODgtYjE5ZS00NDcxNWY5NTkxMzIiLCJhdXRoX3RpbWUiOjE2Njg0Nzc4NDAsImlkcCI6ImxvY2FsIiwibmFtZSI6IjE4MDExNDYzODIxIiwibmlja25hbWUiOiIiLCJyb2xlIjoiVXNlciIsInRpbWVzdGFtcCI6IjYzODA0MTAzNDQwMTE4MjYwOCIsInBsYXRGb3JtIjoiIiwianRpIjoiNURCQjFFNEFBMTlCQjQ5MTIzNEUzOTU0Q0RFMzdGMzAiLCJpYXQiOjE2Njg0Nzc4NDAsInNjb3BlIjoiRm9yT3V0U3lzdGVtQXBpIGh5cy5pbS5hcGkgSFlTLlNDLkFkbWluQXBpIEhZUy5TQy5BcGkgSHlzTWFsbC5DbGllbnQuQVBJIEh5c01hbGwuU3lzTWFuYWdlbWVudC5BUEkgb3BlbmlkIHBlcm1pc3Npb24uYXBpIHByb2ZpbGUgeXNhbGVyLmNsaWVudC5hcGkgemJiLmFkbWluLmFwaSB6YmIuY2xpZW50LmFwaSBaSlMuSU0uQ2xpZW50LkFwcEFwaSB6anMub3NzLmFwaSBvZmZsaW5lX2FjY2VzcyIsImFtciI6WyJjdXN0b20iXX0.wd03NHcZMijR7bMrsMYwRl8XkjvLWDTYK2ci6Syxl6fBfrhrIYsBQeW8PDh0UFIZp4xlvYLoLoGZFlhfebkXWhoRZfcsorAq5v4lCd0u-B662XjeDo2HgRrJrc-dEJFzDuJaGXF_BuBCMOMpXtFSzFxeQchKGFAZJY61Ji1A3hzxoiD8n1CT7878gFbIxb4USJ6NG7zjag86pyvP2aX0XA945Ez-fK6XlvxgsCCVUsZxWmeh3RQCR-K2BnbwfeRh9EOGJZqUcXJ9d8-p_lgbLMkUhy_bXurcrsDqHixsxRUnckT4nweDgeUTxEZzCoV1QZNLvZel-Uz3eR_cJLthqA'
      var phone = '18011463821'  
      var chatId = '6372fb063f6dbd06a4871376'
      document.getElementById('openChat').addEventListener('click', function() {
        api.openFrame({
            name: 'IM',
            url: 'http://172.27.5.237:8080/',
            rect: {
                x: 0,
                y: api.safeArea.top,
                w: 'auto',
                h: 'auto'
            },
            pageParam: {
                token: token,
                phone: phone,
                chatId: chatId,
                type: 'expert'
            }
        });
      })

      document.getElementById('openList').addEventListener('click', function() {
        api.openFrame({
            name: 'IM',
            url: 'http://172.27.5.237:8080/list',
            rect: {
                x: 0,
                y: api.safeArea.top,
                w: 'auto',
                h: 'auto'
            },
            pageParam: {
                token: token,
                phone: phone
            }
        });
      })
    };
  </script>
  </html>
